package com.example.chat.tool;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2025/8/3 9:55
 **/
@Service
public class ToolExecutor {
    @Autowired
    private Map<String, AITool> toolRegistry; // Spring会自动注入所有Tool实现

    public AITool executeTool(String toolName) {
        return toolRegistry.get(toolName + "Tool"); // 如weatherTool
//        return tool.execute(params);
    }
}
